import BaseHttp from './baseHttp'

/**
 * 管理 模块
account: 账号
product: 交易
line: 物流
 */
class mineService extends BaseHttp {
  // 获取产品分类 "api/productClassify/get"
  getProductClassify (param) {
    let url = `${this.baseUrl.product}/productClassify/get`;
    let res = this.post(url,param);
    return res;
  }

  // 获取车辆分组信息
  getListGroup(param){
    let url=`${this.baseUrl.account}/relation_group/get_list_group`;
    let res=this.post(url,param);
    return res;
  }
  // 添加车辆 user_traffic/traffic_admin_add_user_truck
  trafficAdminAddUserTruck(param){
    let url=`${this.baseUrl.account}/user_traffic/traffic_admin_add_user_truck`;
    let res=this.post(url,param);
    return res
  }
  // 邀请
  applyRelationInviteNew(param){
    let url=`${this.baseUrl.account}/apply_relation/invite_new`;
    let res=this.post(url,param);
    return res
  }
  // /percentage_cash/get_one
  getPercentageCash(param){
    let url=`${this.baseUrl.account}/percentage_cash/get_one`;
    let res=this.post(url,param);
    return res
  }
  // /percentage_cash/save_percentage
  savePercentageCash(param){
    let url=`${this.baseUrl.account}/percentage_cash/save_percentage`;
    let res=this.post(url,param);
    return res
  }
  // 获取红包发放列表 /red_card_order_c/get_list
  redCardOrderGetList(param){
    let url=`${this.baseUrl.line}/red_card_order_c/get_list`;
    let res=this.post(url,param);
    return res
  }
  // 获取单个红包
  redCardGetOne(param){
    let url=`${this.baseUrl.line}/red_card_c/get_one`;
    let res=this.post(url,param);
    return res
  }
  // 修改红包  red_card_c/edit
  redCardEdit(param){
    let url=`${this.baseUrl.line}/red_card_c/edit`;
    let res=this.post(url,param);
    return res
  }
  // 修改红包  red_card_c/edit
  redCardAdd(param){
    let url=`${this.baseUrl.line}/red_card_c/add`;
    let res=this.post(url,param);
    return res
  }
  // 工厂
  // static obj = new mineService();
  static getInstance () {
    return this.obj
  }
}
mineService.obj = new mineService();
export default mineService.getInstance()
